package mqs

import (
	"github.com/zeromicro/go-queue/kq"
	"property_service/internal/config"
)

var producer *kq.Pusher

func CreateKafkaProducer(c *config.Config) *kq.Pusher {
	// if producer == nil {
	// 	// 创建 Kafka 生产者
	// 	producer = kq.NewPusher(c.KqPusherConf.Brokers, c.KqPusherConf.Topic, kq.WithAllowAutoTopicCreation())
	// 	if producer == nil {
	// 		panic("Failed to create Kafka producer")
	// 	}
	// }
	return producer
}
